#if !defined(AFX_UVSETTINGDLG_H__CBB648B8_7D01_49C1_80EB_5C214178AB6B__INCLUDED_)
#define AFX_UVSETTINGDLG_H__CBB648B8_7D01_49C1_80EB_5C214178AB6B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// UVSettingDlg.h : header file
//

#include "Util\MinButton.h"
#include "Util\MinLabel.h"

#define ALL_HAND_LABEL 5
#define ALL_MANUAL_LABEL 5
#define ALL_CALIBRATION_LABEL 6
#define ALL_DATA 10

class IIO;
// Control Layer
class ITransfer;

// Process Layer
class IAutoManager;
class ITrsTransfer;
// Common Layer
class CDMControlCenter;
class CErrorCodeData;
class CSystemData;
class CUVLightData;
class CModelData;
class CUVLogData;

/////////////////////////////////////////////////////////////////////////////
// CUVSettingDlg dialog

class CUVSettingDlg : public CDialog
{
// Construction
private:
	IAutoManager* m_lnkAutoManager;
	ITransfer* m_lnkTransfer;
	
	CSystemData* m_lnkSystemData;
	CUVLightData* m_lnkUVLightData;
	CModelData*	m_lnkModelData;
	CUVLogData* m_lnkUVLogData;
	
	BOOL m_bErrorDisplay;
	CErrorCodeData* m_lnkErrorCodeData;
	IIO* m_lnkIO;
	
	char m_cBufGet[50];
	char m_cbuf[50];

	BOOL UVLightComplete;

public:
	CUVSettingDlg(IAutoManager* pAM, CDMControlCenter* pDMCC, IIO* pIO, CWnd* pParent = NULL);   // standard constructor

	void PointSelect(int sel);
	void Display(BOOL change);
	void Display1(BOOL change);
	void Display2(BOOL change);
	void LabelInitial();
	void ButtonInitial();

// Dialog Data
	//{{AFX_DATA(CUVSettingDlg)
	enum { IDD = IDD_SETT_UV };
	CMinButton m_bExit;
	CMinButton m_bSave;
	CMinButton m_bCh1;
	CMinButton m_bCh2;
	CMinButton m_bCh3;
	CMinButton m_bCh4;
	CMinButton m_bCh5;
	CMinButton m_bLightStart;
	CMinButton m_bLightStop;
	CMinButton m_bHandCh1;
	CMinButton m_bHandCh2;
	CMinButton m_bHandCh3;
	CMinButton m_bHandCh4;
	CMinButton m_bHandCh5;
	CMinButton m_bHandStart;
	CMinButton m_bHandStop;
	CMinButton m_bAutoMax;
	CMinButton m_bAutoMin;
	CMinButton m_bHandMax;
	CMinButton m_bHandMin;
	CMinButton m_bAutoAverage;
	CMinButton m_bHandAverage;
	CMinButton m_bCalibration;

		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUVSettingDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	double Result1[ALL_MANUAL_LABEL];
	double Result2[ALL_MANUAL_LABEL];
	double ResultSum[ALL_MANUAL_LABEL];
	double m_tmpDouble[ALL_HAND_LABEL];
	double m_tmpDouble1[ALL_CALIBRATION_LABEL];
	double m_Calibration[ALL_DATA];
	CMinLabel	m_sData[ALL_HAND_LABEL];
	CMinLabel	m_sData1[ALL_MANUAL_LABEL];
	CMinLabel	m_sData2[ALL_CALIBRATION_LABEL];

	// Generated message map functions
	//{{AFX_MSG(CUVSettingDlg)
	afx_msg void OnLightStart();
	afx_msg void OnLightStop();
	afx_msg void OnHandStart();
	afx_msg void OnHandStop();
	afx_msg void OnHandCh1();
	afx_msg void OnHandCh2();
	afx_msg void OnHandCh3();
	afx_msg void OnHandCh4();
	afx_msg void OnHandCh5();
	virtual BOOL OnInitDialog();
	afx_msg void OnSave();
	afx_msg void OnCalibration();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_UVSETTINGDLG_H__CBB648B8_7D01_49C1_80EB_5C214178AB6B__INCLUDED_)
